package hustlas.ball.preparse;

import java.util.regex.*;

/**
 * EXTRules are basically Tuples of a regex Pattern and Tokens that allow for
 * advanced token parsing in the Lexer
 * 
 * @author Steven
 *
 */
public class EXTRule {
	
	private Pattern tokenRegex;
	private Tokens ruleToken;
	
	EXTRule(String pattern, Tokens token) {
		this.tokenRegex = Pattern.compile(pattern);
        this.ruleToken = token;
	}
	
	public Pattern getTokenRegex() {
		return tokenRegex;
	}
	
	public Tokens getRuleToken() {
		return ruleToken;
	}
}
